package main

import (
	"fmt"
	"reflect"
)

func main() {
	var numA int
	typeOfNumA := reflect.TypeOf(numA)
	//根据类型创建变量numAVal
	numAVal := reflect.New(typeOfNumA)
	//输出numAvalue的值,类型名称和种类名称
	fmt.Println(numAVal, numAVal.Type(), numAVal.Kind())
	//修改numVale表示的值
	numAVal.Elem().SetInt(100)
	//输出numVal表示的值
	fmt.Println(numAVal.Elem().Int())
}
